package com.chen.mapper;

import com.chen.pojo.Article;
import com.chen.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author chen
 */
@Mapper
public interface EchartsMapper {

//    根据类别分类
    @Select("select count(*) articleCount,category from article group by category")
    List<Article> articleList();


//    根据性别分类
    @Select("select count(*) userSexCount ,sex from user group by sex")
    List<User> userSexCount();
}
